package com.lin.healthmanagement.dao;

import com.lin.healthmanagement.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface UserDao {
    public User getUserByMessage(@Param("userName")String userName,
    @Param("password")String password);

    public List<User> getAllUsers(@Param("userName")String userName,
    @Param("pageStart")int pageStart,@Param("pageSize")int pageSize);


    public int getUsersCounts(@Param("userName")String userName);

    public int updateState(@Param("id")Integer id,@Param("state")Integer state);

    public int addUser(User user);


    public int deleteById(@Param("id")int id);

    public User getUpdateUser(@Param("id")int id);

    public int updateUser(User user);
}
